
#import "UIView+YHFrame.h"

@implementation UIView (YHFrame)

@dynamic yh_maxX,yh_maxY,yh_minY;

-(void)setYh_origin:(CGPoint)origin
{
    CGRect frame = self.frame;
    frame.origin = origin;
    self.frame = frame;
}

-(CGPoint)yh_origin
{
    return self.frame.origin;
}

-(void)setYh_size:(CGSize)size
{
    CGRect frame = self.frame;
    frame.size = size;
    self.frame = frame;
}

-(CGSize)yh_size
{
    return self.frame.size;
}

-(void)setYh_x:(CGFloat)x
{
    CGRect frame = self.frame;
    frame.origin.x = x;
    self.frame = frame;
}

-(CGFloat)yh_x
{
    return self.frame.origin.x;
}

-(void)setYh_y:(CGFloat)y
{
    CGRect frame = self.frame;
    frame.origin.y = y;
    self.frame = frame;
}

-(CGFloat)yh_y
{
    return self.frame.origin.y;
}

-(void)setYh_width:(CGFloat)width
{
    CGRect frame = self.frame;
    frame.size.width = width;
    self.frame = frame;
}

-(CGFloat)yh_width
{
    return self.frame.size.width;
}

-(void)setYh_height:(CGFloat)height
{
    CGRect frame = self.frame;
    frame.size.height = height;
    self.frame = frame;
}

-(CGFloat)yh_height
{
    return self.frame.size.height;
}

-(void)setYh_centerX:(CGFloat)centerX
{
    CGPoint center = self.center;
    center.x = centerX;
    self.center = center;
}

-(CGFloat)yh_centerX
{
    return self.center.x;
}

-(void)setYh_centerY:(CGFloat)centerY
{
    CGPoint center = self.center;
    center.y = centerY;
    self.center = center;
}

-(CGFloat)yh_centerY
{
    return self.center.y;
}

-(CGFloat)yh_maxY{
    return CGRectGetMaxY(self.frame);
}

-(CGFloat)yh_minY{
    return CGRectGetMinY(self.frame);
}

-(CGFloat)yh_maxX{
    return CGRectGetMaxX(self.frame);
}

- (CGFloat)yh_minX{
    return CGRectGetMinX(self.frame);
}



@end
